package com.kx.yooli.kx.wechat.constant;

import com.kx.yooli.kx.wechat.config.propertiesconf.CustomizedPropertyConfigurer;
import com.kx.yooli.kx.wechat.utils.message.MessageUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashMap;
import java.util.Map;

/**
 * @author john_sqwen-childe.wen
 * @date 2024/4/1
 * @PROJECT_NAME wechat
 * @description create Constants by john_sqwen
 * and  value is
 */
public class Constants {
    private final Logger log = LoggerFactory.getLogger(Constants.class);
    public static final String APP_ID = CustomizedPropertyConfigurer.getContextProperty("app.id").toString();
    public static final CharSequence SCOPE = null;
    public static final String APPSECRET = CustomizedPropertyConfigurer.getContextProperty("app.secret").toString();
    public static final String TOKEN = CustomizedPropertyConfigurer.getContextProperty("token").toString();

    public static final String ACCESS_TOKEN_NAME = CustomizedPropertyConfigurer.getContextProperty("redis.key.wechat.accesstoken").toString();

    /**
     * 新文件服务器访问地址
     */
    public static final String FILE_CLIENT_BASE_URL = CustomizedPropertyConfigurer.getContextProperty("fileClient.baseURL").toString();

    /**
     * 新文件服务器访问key
     */
    public static final String FILE_CLIENT_ACCESS_KEY = CustomizedPropertyConfigurer.getContextProperty("fileClient.accessKey").toString();

    /**
     * 新文件服务器APPID
     */
    public static final String FILE_CLIENT_APP_ID = CustomizedPropertyConfigurer.getContextProperty("fileClient.appID").toString();

    /**
     * 新文件服务器SPACE
     */
    public static final String FILE_CLIENT_SPACE = CustomizedPropertyConfigurer.getContextProperty("fileClient.space").toString();

    /**
     * 临时目录
     */
    public final static String BASE_TEMPFILE_PATH = CustomizedPropertyConfigurer.getContextProperty("base.tempfile.path").toString();


    public static String QRCODEURL = CustomizedPropertyConfigurer.getContextProperty("qrcodeUrl").toString();
    public static String QRCODECREATEURL = CustomizedPropertyConfigurer.getContextProperty("qrcodeCreate").toString();

    private static String idCheckUrl = CustomizedPropertyConfigurer.getContextProperty("idCheckUrl").toString();
    //==================芝麻信用分=======================================
    /***
     * 请求的服务器地址或id
     */
    public final static String ZHIMA_SERVER_URL = CustomizedPropertyConfigurer.getContextProperty("zhima.server.url").toString();
    /**
     * 调用接口
     */
    public final static String ZHIMA_METHOD_URL = CustomizedPropertyConfigurer.getContextProperty("zhima.method.url").toString();
    /**
     * 机构标识
     */
    public final static String ZHIMA_ORGAN_IDENTITY = CustomizedPropertyConfigurer.getContextProperty("zhima.organ.identity").toString();
    /**
     * pc方式调用
     */
    public final static String ZHIMA_PC_INVOKE = "1";
    /**
     * h5方式调用
     */
    public final static String ZHIMA_H5_INVOKE = "2";

    //==================芝麻信用分=======================================
    /**
     * 分享二维码的链接
     */
    public static String SHAREQRCODEURL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.SHAREQRCODE_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 跳转到还款计划链接
     */
    public static String REPAY_PLAN_URL=idCheckUrl+APP_ID+"&redirect_uri="+ServiceUrl.WECHAT_BASE_URL+"payback/paymentList?loanNo=LOANNO%26applyDate=APPLYDATE%26isWrite=true&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
    /**
     * 跳转到我的账单页面
     */
    public static String REPAY_MY_ACCOUNT=idCheckUrl+APP_ID+"&redirect_uri="+ServiceUrl.WECHAT_BASE_URL+"payback/amountList?loanNo=LOANNO%26applyDate=APPLYDATE%26isWrite=true&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
    // 获取jsapi_ticket的接口地址
    // public final static String JSAPI_TICKET_URL =
    // CustomizedPropertyConfigurer.getContextProperty("jsapi.ticket.url").toString();
    // public final static String CONNECT_URL =
    // CustomizedPropertyConfigurer.getContextProperty("connect.url").toString();

    /**
     * 获取access_token
     */
    public static final String accessTokenUrl = CustomizedPropertyConfigurer.getContextProperty("access.token.url").toString();

    /**
     * 网页授权获取openidurl
     */
    public static final String getOpenIdUrl = CustomizedPropertyConfigurer.getContextProperty("getOpenIdUrl").toString() + APP_ID
            + "&secret=" + APPSECRET + "&grant_type=authorization_code";

    /**
     * 绑定手机号微信url
     */
    public static final String WECHATUSERBINDINGURL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.BIND_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 扫描企业二维码公众号消费贷录单页面跳转url
     */
    public static final String WECHATMARINFOURL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.MARINFO_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    public static final String WECHATYMPERSONURL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.YMPERSON_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    public static final String POS_MYAPPLY_LIST = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.WECHAT_URL + "app/wechatPosLoan/myApplyInfo"
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 扫描企业二维码公众号现金贷录单页面跳转url
     */
    public static final String WECHATCASHLOANURL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.CASHLOAN_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 扫描企业二维码公众号K易贷录单页面跳转url
     */
    public static final String RESERVATIONURL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.RESERVATION_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 扫描企业二维码公众号商户贷现金贷录单页面跳转url
     */
    public static final String MERLOANURL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.MERLOAN_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 扫描企业二维码公众号柠檬医美录单分期页面跳转url
     */
    public static final String LEMOLOANURL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.LEMOGOODSLOAN_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 授权书签署页面
     */
    private static final String AUTHORIZATION = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.AUTHORIZATION_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 申请跳转url
     */
    private static final String WECHATSAPPLYURL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.APPLY_URL
            +  "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 返修页
     */
    public static final String MODIFYSCOPE = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.MODIFYSCOPE_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
    /**
     * 返修页
     */
    public static final String MODIFYSCOPE_P003 = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.MODIFYSCOPE_P003_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
    /**
     * 返修页
     */
    public static final String MODIFYSCOPE_R = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.MODIFYSCOPE_R_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 我的贷款申请url
     */
    private static final String MYAPPLY = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.MYAPPLY_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
    /**
     * 免费领卷url
     * */
    private static final String RECEIVECOUPON=idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.RECEIVECOUPON_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
    /**
     * 现金贷下单
     */
    private static final String identifyChoose = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.IDENTIFYCHOOSE_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 我的账单
     */
    public static final String CURRENT_BILL_REDIRECT_URL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.REPAYMENT_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 主动还款
     */
	/*public static final String REPAYMENT_REDIRECT_URL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.REPAYMENT_URL
			+ "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
	*/

    /**
     * 征信查询
     */
    public static final String CREDIT_QUERY_URL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.QUERY_CREDIT_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 邀请好友跳转url
     */
    private static final String DRAINSAPPLYURL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.DRAINS_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
    /**
     * 邀请好友活动页url
     */
    private static final String DRAINSACTIVITYURL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.DRAINSACTIVITY_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 远程接口url
     */
    // public static final String REPAY_INFO_URL =
    // CustomizedPropertyConfigurer.getContextProperty("url.pclservice.queryRepayInfo").toString();

    /**--------------------- 微信公众号回复URL-start---------------------------------- */

    /**公众号回复跳转到还款计划链接*/
    public static String WECHAT_REPAY_PLAN_URL=idCheckUrl+APP_ID+"&amp;redirect_uri="+ServiceUrl.WECHAT_BASE_URL+"payback/paymentList?lisWrite=true%26%rt=loan_follow&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";

    /**
     * 公众号回复跳转我的账单
     */
    public static final String WECHAT_REPLY_CURRENT_BILL_REDIRECT_URL = idCheckUrl + APP_ID + "&amp;redirect_uri=" + ServiceUrl.REPAYMENT_URL
            + "?rt=repayment_follow&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";

    /**
     * 跳转到还款计划链接
     */
    public static String WECHAT_REPLY_REPAY_PLAN_URL=idCheckUrl+APP_ID+"&amp;redirect_uri="+ServiceUrl.WECHAT_BASE_URL+"kx_wechat/app/wechatPosLoan/myApplyInfo?p=f_apply_apply%26%rt=loan_menu&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";

    /**
     * 征信查询
     */
    public static final String WECHAT_REPLY_CREDIT_QUERY_URL = idCheckUrl + APP_ID + "&amp;redirect_uri=" + ServiceUrl.QUERY_CREDIT_URL
            + "?rt=verify_follow&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";

    /**
     * 公众号回复绑定手机号微信url
     */
    public static final String WECHAT_REPLY_AUTHENTICATION_URL = idCheckUrl + APP_ID + "&amp;redirect_uri=" + ServiceUrl.BIND_URL
            + "?p=f_apply_idbdg%26rt=binding_follow02&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";

    /**
     * 快信动态链接
     */
    public static final String KUAI_XIN_DONG_TAI = "https://mp.weixin.qq.com/mp/homepage?__biz=MzA5MjA5Mzk2OQ%3D%3D&amp;hid=1&amp;sn=c8599b6136e0075b84fc1d899425bca3";

    /**
     * 现金贷下单
     */
    public static final String WECHAT_REPLY_identifyChoose = idCheckUrl + APP_ID + "&amp;redirect_uri=" + ServiceUrl.WECHAT_URL + "app/weixinApply/identityChoose?p=bt_kl_apply_o01%26rt=newkld_follow"
            + "&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";

    public static final String WECHAT_REPLY_BILLLIST_PREFIX = CustomizedPropertyConfigurer.getContextProperty("url.wechat.reply.billList").toString();
    public static final String WECHAT_REPLY_REPAY_RECORD = idCheckUrl+APP_ID+"&amp;redirect_uri="+WECHAT_REPLY_BILLLIST_PREFIX+"payback/paymentList/billList?p=f_apply_apply%26%rt=repayment_follow&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";

    /**--------------------- 微信公众号回复URL-end---------------------------------- */

    /**
     * 还款消息跳转链接
     */
    public static final String REPAY_MSG_JUMP_URL = "https://staticweixin.pohoocredit.com/app/index.html?rt=app_download_PHKX_msg_";



    /**
     * GET
     */
    public static final String Request_Method_Get = "GET";

    /**
     * POST
     */
    public static final String Request_Method_Post = "POST";

    /**
     * 菜单类型-click
     */
    public static final String MENU_TYPE_CLICK = "click";

    /**
     * 菜单类型-view
     */
    public static final String MENU_TYPE_VIEW = "view";

    /**
     * 身份验证
     */
    public static final String WECHATUSERBINDING_URL = WECHATUSERBINDINGURL;
    /**
     * 我要申请--快信贷key
     */
    public static final String KX_LOAN = "kx_loan";

    /**
     * 我要申请--在线申请
     */
    public static final String APPLY_ONLINE = WECHATSAPPLYURL;
    /**
     * 邀请好友--在线邀请
     */
    public static final String DRAINS_ONLINE = DRAINSAPPLYURL;
    /**
     * 目标用户话费面值
     */
    public static final double GOALCOUPON = 100;
    /**
     * 种子用户话费面值
     */
    public static final double TORRENTCOUPON = 50;
    /**
     * 邀请好友活动介绍--在线邀请
     */
    public static final String DRAINSACTIVITYURL_ONLINE = DRAINSACTIVITYURL;

    /**
     * 我要申请--我的贷款申请
     */
    public static final String MY_APPLY = MYAPPLY;
    /**
     * 免费领卷
     * */
    public static final String RECEIVE_COUPON=RECEIVECOUPON;
    /**
     * 我要申请--现金贷申请
     */
    public static final String identify_Choose = identifyChoose;

    /**
     * 我要查账--贷款信息
     */
    public static final String LOAN_INFO = "loan_info";

    /**
     * 我要查账--本月账单
     */
    public static final String THIS_MONTH_BILL = "this_month_bill";

    /**
     * 我要查账--已还账单
     */
    public static final String PAID_BILL = "paid_bill";

    /**
     * 我要查账--随心包查询
     */
    public static final String HEART_INFO = "heart_info";

    /**
     * 在线申请--人工客服
     */
    public static final String CUSTOM_SERVICE = "custom_service";
    //利卡商城
    public static final String LK_BUSI = "https://cmsh5.pohoocredit.com/?pageId=275&pageType=1";
    /**
     * 关于我们--快信介绍
     */
    // public static final String KX_INFO = "kx_info

    public static final String KX_INFO = "http://mp.weixin.qq.com/mp/homepage?__biz=MzA5MjA5Mzk2OQ==&hid=1&sn=c8599b6136e0075b84fc1d899425bca3&p=f_connus_kxdyst#wechat_redirect";
    /**
     * 信分期--如何申请
     */
    public static final String APPLY_URL = "http://mp.weixin.qq.com/s?__biz=MzA5MjA5Mzk2OQ==&mid=501737840&idx=1&sn=0d84c5414bad4e93a5668fac4e44a59a&chksm=0861220e3f16ab189304385e331d3f6040004c6824002d400934977765464259b3e2eee2af97&p=f_connus_appflow#rd";

    /**
     * 联系我们--我要抽奖
     */
    public static final String LUCK_DRAW_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxff4d8fb6288810d0&redirect_uri=https://weixin.pohoocredit.com/kx_wechat/app/activities/lottery?rt=activities_menu&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 信分期--你问我答
     */
    // public static final String ANSWER_URL =
    // "http://mp.weixin.qq.com/s?__biz=MzA5MjA5Mzk2OQ==&mid=501732842&idx=1&sn=224e4ddb52eb0f2ba0cac07346019d94&scene=18#wechat_redirect";
    /**
     * 分期账单--常见问题
     */
    public static final String FAQ_URL = "http://nycp.legendh5.com/h5/f4d8df1d-97f4-4672-dc16-d4db46c5d1cb.html?p=f_repay_faq";

    /**
     * 信分期--理财小窍门
     */
    public static final String FINANCIAL_URL = "http://mp.weixin.qq.com/s?__biz=MzA5MjA5Mzk2OQ==&mid=501732790&idx=1&sn=a13c2e837eb9a2c502c0115cb30970a2&scene=18#wechat_redirect";

    /**
     * 信分期--分期计算器
     */
    public static final String CALCULATOR_URL = "http://www.pohoocredit.com/product/?block=3";

    /**
     * 信分期--征信查询
     */
    public static final String CREDIT_URL = "http://www.pbccrc.org.cn";

    /**
     * 在线申请--消费贷
     */
    public static final String CONSUME_URL = "http://d.eqxiu.com/s/uzC4UTGX?p=f_apply_prdstg";
    /**
     * 橙信季
     */
    public static final String CHENGXINJI_URL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.YM_JY_APPLY_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 查征异议申请
     */
    public static final String CZYY_URL = "http://cn.mikecrm.com/J60LYTe?p=f_repay_credit";


    /**
     * 在线申请--身份验证
     */
    public static final String AUTHENTICATION_URL = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.BIND_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 关于我们--商户合作
     */
    public static final String BUS_COOPERATION = "bus_cooperation";

    /**
     * 关于我们--商户合作
     */
    public static final String BUS_URL = "http://u.eqxiu.com/s/gccTAh1f?p=f_connus_coper";

    /**
     * 关于我们--招贤纳士
     */
    public static final String RECRUIT = "recruit";

    /**
     * 关于我们--公司官网
     */
    public static final String COMPANY_WEBSITE = "http://www.pohoocredit.com";


    /**
     * 账户中心主页url
     */
    public static final String ACCOUNT_CENTER = idCheckUrl + APP_ID + "&redirect_uri=" + ServiceUrl.ACCOUNT_CENTER_URL
            + "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";

    /**
     * 关于我们--快信商城
     */
    public static final String KX_MALL = "https://weidian.com/s/1165076100?wfr=c&ifr=shopdetail&p=f_repay_store";

    /**
     * 关于我们--百度社区
     */
    public static final String BAIDU_URL = "http://tieba.baidu.com/f?ie=utf-8&kw=%E6%99%AE%E6%83%A0%E5%BF%AB%E4%BF%A1";

    /*下载app地址*/
    public static final String DOWNLOAD_APP_URL = CustomizedPropertyConfigurer.getContextProperty("download.app.url").toString();

    /**
     * 关于我们--在线投诉
     */
    public static final String ONLINE_COMPLAINT = "online_complaint";

    /**
     * sale端发起的客户贷款被关注以后回复的消息
     */
    // public static final String
    // DEFAULT_ATTENTION_MSG=MessageUtil.handleMessageByCData("嗨！/:,@-D\n欢迎关注您身边的分期专家——普惠快信！\n门槛低，服务好，速度快\n分期付款，就选普惠快信\n在线申请，请在下方-【在线申请】中申请现金贷和消费贷！\n\n【回复框内信息，获取相关资讯！】\n请回复【还款情况查询】，了解您的还款相关事项\n请回复【提前还款】，了解提前还款相关事项;\n请 回复【变更银行卡】，了解银行卡变更相关事项\n请回复【延迟还款】，了解延迟还款相关事项;\n请 回复【逾期】，了解逾期相关事项;\n请回复【商户+您的门店所在城区】，为您推送专属信息。\n\n<a href=\""+WECHATUSERBINDINGURL+"\">点击这里</a>完成您的身份验证；\n");
    public static final String DEFAULT_ATTENTION_MSG = MessageUtil
            .handleMessageByCData("确认过眼神，你就是我的人！[调皮]\n" +
                    "好看的人都关注了普惠快信，在这里，小普君将为您提供最好的金融服务。\n" +
                    "<a href=\""+ WECHATUSERBINDINGURL.replace("authentication","authentication?rt=binding_follow") +"\">点击此处</a>先完成身份绑定吧\n" +
                    "尝试输入任意文字还可解锁更多技能哦[玫瑰]\n" +
                    "-----------------------\n" +
                    "【2018年9月1日后签约客户敬请注意】\n" +
                    "请您最迟于当月还款日在本公众号内使用微信主动还款！\n" +
                    "若还款日第3天仍未成功还款，系统自动判定为逾期，届时我司将发起银行划扣，划扣金额包括逾期滞纳金。");
    /**
     * 微信企业号发起的消费贷客户贷款被关注以后回复的消息
     */
    public static final String DEFAULT_ATTENTION_MSG_COMP = MessageUtil
            .handleMessageByCData("好看的人都关注了普惠快信，在这里，小普君将为您提供最好的金融服务[转圈][转圈]\n<a href=\""
                    + WECHATMARINFOURL + "\">点击这里</a>进行录单；\n\n尝试输入任意文字还可解锁更多技能哦[玫瑰]\n-----------------------\n【2018年9月1日后签约客户敬请注意】\n请您最迟于当月还款日在本公众号内使用微信主动还款！\n" +
                    "若还款日第3天仍未成功还款，系统自动判定为逾期，届时我司将发起银行划扣，划扣金额包括逾期滞纳金。");

    /**
     * 微信企业号发起的现金贷客户贷款被关注以后回复的消息
     */
    public static final String DEFAULT_ATTENTION_MSG_COMP_CASH = MessageUtil
            .handleMessageByCData("好看的人都关注了普惠快信，在这里，小普君将为您提供最好的金融服务[转圈][转圈]\n\n<a href=\""
                    + WECHATCASHLOANURL + "\">点击这里</a>进行录单；\n\n尝试输入任意文字还可解锁更多技能哦[玫瑰]\n-----------------------\n【2018年9月1日后签约客户敬请注意】\n请您最迟于当月还款日在本公众号内使用微信主动还款！\n" +
                    "若还款日第3天仍未成功还款，系统自动判定为逾期，届时我司将发起银行划扣，划扣金额包括逾期滞纳金。");

    /**
     * 微信企业号发起的K易贷客户贷款被关注以后回复的消息
     */
    public static final String DEFAULT_ATTENTION_MSG_RESERVATION_CASH = MessageUtil
            .handleMessageByCData("好看的人都关注了普惠快信，在这里，小普君将为您提供最好的金融服务[转圈][转圈]\n<a href=\""
                    + RESERVATIONURL + "\">点击这里</a>进行录单；\n\n尝试输入任意文字还可解锁更多技能哦[玫瑰]\n-----------------------\n【2018年9月1日后签约客户敬请注意】\n请您最迟于当月还款日在本公众号内使用微信主动还款！\n" +
                    "若还款日第3天仍未成功还款，系统自动判定为逾期，届时我司将发起银行划扣，划扣金额包括逾期滞纳金。");

    /**
     * 微信企业号发起的商户贷现金贷客户贷款被关注以后回复的消息
     */
    public static final String DEFAULT_ATTENTION_MSG_MERLOAN_CASH = MessageUtil
            .handleMessageByCData("好看的人都关注了普惠快信，在这里，小普君将为您提供最好的金融服务[转圈][转圈]\n<a href=\""
                    + MERLOANURL + "\">点击这里</a>进行录单；\n\n尝试输入任意文字还可解锁更多技能哦[玫瑰]\n-----------------------\n【2018年9月1日后签约客户敬请注意】\n请您最迟于当月还款日在本公众号内使用微信主动还款！\n" +
                    "若还款日第3天仍未成功还款，系统自动判定为逾期，届时我司将发起银行划扣，划扣金额包括逾期滞纳金。");

    /**
     * 微信企业号发起的贷款进行授权书签署
     */
    public static final String DEFAULT_ATTENTION_MSG_AUTHO = MessageUtil
            .handleMessageByCData("好看的人都关注了普惠快信，在这里，小普君将为您提供最好的金融服务[转圈][转圈]\n<a href=\""
                    + AUTHORIZATION + "\">点击这里</a>进行授权；\n\n尝试输入任意文字还可解锁更多技能哦[玫瑰]\n-----------------------\n【2018年9月1日后签约客户敬请注意】\n请您最迟于当月还款日在本公众号内使用微信主动还款！\n" +
                    "若还款日第3天仍未成功还款，系统自动判定为逾期，届时我司将发起银行划扣，划扣金额包括逾期滞纳金。");

    /**
     * 微信企业号发起的医美教育贷款先分期页再授权最后进行录单
     */
    public static final String DEFAULT_ATTENTION_MGS_LEMO = MessageUtil
            .handleMessageByCData("\"好看的人都关注了普惠快信，在这里，小普君将为您提供最好的金融服务[转圈][转圈]\n<a href=\""
                    + LEMOLOANURL + "\">点击这里</a>进行录单；\n\n尝试输入任意文字还可解锁更多技能哦[玫瑰]\n-----------------------\n【2018年9月1日后签约客户敬请注意】\n请您最迟于当月还款日在本公众号内使用微信主动还款！\n" +
                    "若还款日第3天仍未成功还款，系统自动判定为逾期，届时我司将发起银行划扣，划扣金额包括逾期滞纳金。");
    /**
     * 自动恢复默认恢复消息。
     */
    public static final String DEFAULT_RESPONSE_MSG = MessageUtil
            .handleMessageByCData("呃，不太明白，您的问题难倒我了呢。/::$感谢您关注普惠快信。我司客服热线为028-962516，微信平台线上客服时间段为8:30-22:00，如咨询人数较多，客服小妹未能及时给您回复请耐心等待，给您带来的不便敬请谅解。/:P-(");

    /**
     * 未绑定时的消息
     */
    public static final String WECHATUSER_NOTBINDING = MessageUtil.handleMessageByCData("为了确保您的个人信息安全，请您<a href=\"" + WECHATUSERBINDINGURL.replace("authentication","authentication?rt=binding_follow")
            + "\">点击这里</a>完成您的身份验证，验证后即可随时查看您的个人贷款信息及相关服务。");

    /**
     * 未绑定身份信息提示V2
     */
    public static final String WECHATUSER_NOTBINDING_V2 = MessageUtil.handleMessageByCData("请先绑定身份证号, <a href=\""
            + Constants.WECHATUSERBINDING_URL.replace("authentication","authentication?rt=binding_follow") + "\">点我绑定</a>");

    /**
     * 还款提醒类型
     */
    public static final String REMIND_TYPE_3DAY_BEFORE = "03";
    public static final String REMIND_TYPE_0DAY_BEFORE = "00";

    /**
     * 验证码时效长度，单位分钟
     */
    public static final int PRESCRIPTION = 10;
    /**
     * 验证码重复发送时间间隔, 单位为分钟
     */
    public static final int CAPTCHAGAP = 1;
    /**
     * 序列名称
     */
    public static final String SEQUENCENAME = "weixincode";
    public static final String SEQUENCEAPP = "appcode";
    /**
     * 序列名称
     */
    public static final String SEQUENCEDRAINS = "drainscode";
    /**
     * 微信绑定验证码
     */
    public static final String MESSAGETYPE = "1";
    public static final String MESSAGEDRAINS = "2";
    public static final String MESSAGEAPP = "3";
    /**
     * 验证码类型
     */
    public static final String CODETYPE = "weixinbing";
    /**
     * 服务返回码
     */
    public static final String RESULT_CODE_SUCCESS = "01";
    public static final String RESULT_CODE_FAIL = "02";
    /**
     * 每个手机号每天能发出的短信的条数（最大）
     */
    public static final int MAXCOUNT = 99;

    public static final String CACHENOVALUE = "noValue";

    /**
     * 扣款结果
     */
    public static final String DEDUCT_CODE_SUCCESS = "01";
    public static final String DEDUCT_CODE_FAIL = "02";
    /**
     * 扣款通知类型
     */
    public static final String deduct_notify_type_overdue_success_2overdue = "04";// 逾期客户扣款成功还是逾期客户
    public static final String deduct_notify_type_overdue_fail = "05";// 逾期客户扣款失败

    /**
     * 二维码类型--临时
     */
    public static final String QR_TYPE_QR_SCENE = "QR_SCENE"; // 菜单创建（POST）
    public final static String MENU_CREATE_URL = CustomizedPropertyConfigurer.getContextProperty("menu.create.url").toString();

    // 菜单删除(POST)
    public final static String MENU_DELETE_URL = CustomizedPropertyConfigurer.getContextProperty("menu.delete.url").toString();

    // 获取菜单
    // public final static String GET_MENU_URL =
    // CustomizedPropertyConfigurer.getContextProperty("get.menu.url").toString();

    // 还款提醒模板ID
    // public final static String TEMPLATE_REMIND_ID =
    // CustomizedPropertyConfigurer.getContextProperty("templateId.repayRemind").toString();

    // 获取jsapi_ticket的接口地址
    public final static String JSAPI_TICKET_URL = CustomizedPropertyConfigurer.getContextProperty("jsapi.ticket.url").toString();

    // id5的接口配置username
    public static String DUBBO_SERNAME = CustomizedPropertyConfigurer.getContextProperty("id5.userName").toString();
    // id5的接口配置iccheckXml
    public static String DUBBO_PASSWORD = CustomizedPropertyConfigurer.getContextProperty("id5.passWord").toString();
    // id5的接口配置iccheckXml
    public static String DUBBO_TIANXING_TOKEN = CustomizedPropertyConfigurer.getContextProperty("tianxing.token").toString();
    //架构组第三方接口
    public static String BRONG_THRID_URL = CustomizedPropertyConfigurer.getContextProperty("pohoocredit.framework.third").toString();
    //架构组第三方接口ip
    public static String THRID_HOST_URL = CustomizedPropertyConfigurer.getContextProperty("pohoocredit.framework.third").toString();
    //bi 组接口
    public static String BI_TOKEN = CustomizedPropertyConfigurer.getContextProperty("pohoocredit.bi.token").toString();
    public static String BI_URL =  CustomizedPropertyConfigurer.getContextProperty("pohoocredit.bi.service").toString();

    /**
     * 二维码类型--永久
     */
    public static final String QR_TYPE_QR_LIMIT_SCENE = "QR_LIMIT_SCENE";

    /**
     * 二维码类型--永久的字符串参数值
     */
    public static final String QR_TYPE_QR_LIMIT_STR_SCENE = "QR_LIMIT_STR_SCENE";
    /**
     * 柠檬相关 唯一标识
     */
    public static final String LEMEO_APP_KEY = CustomizedPropertyConfigurer.getContextProperty("nm.appKey").toString();
    /**
     * 柠檬接口URI=>黑名单查询（方法名）
     */
    public static final String BLACKLISTINFOQUERY_URI = "/blacklistInfoQuery";
    /**
     * 柠檬接口URI=>姓名、身份证、银行卡一致性验证【Rong360提供的接口】
     */
    public static final String NAMEIDCARDACCOUNTVERIFY_URI = "/nameIdCardAccountVerify";
    /**
     * 柠檬接口URI=>姓名、身份证、电话号码、跳转的URL通话详单认证
     */
    public static final String MOBILECRAWLER_URI = "/mobileCrawler";

    /**
     * 主动还款账单的url
     */
    public static final String Wei_Xin_Cust_Repay_Status = CustomizedPropertyConfigurer.getContextProperty("wei.xin.cust.repay.status.url")
            .toString();
    public static final String Wei_Xin_Cust_Prepay = CustomizedPropertyConfigurer.getContextProperty("wei.xin.cust.prepay.url").toString();
    public static final String Wei_Xin_Cust_Trade = CustomizedPropertyConfigurer.getContextProperty("wei.xin.cust.trade.url").toString();
    public static final String Wei_Xin_Cust_Trade_Status = CustomizedPropertyConfigurer.getContextProperty("wei.xin.cust.trade.status.url")
            .toString();
    public static final String Wei_Xin_Cust_Bank_Card_Info = CustomizedPropertyConfigurer.getContextProperty(
            "wei.xin.cust.bank.card.info.url").toString();
    public static final String Wei_Xin_Cust_Repay_Info = CustomizedPropertyConfigurer.getContextProperty("wei.xin.cust.repay.info.url")
            .toString();
    public static final String Wei_Xin_Cust_Indeed_RepayInfo = CustomizedPropertyConfigurer.getContextProperty(
            "wei.xin.cust.indeed.repay.info.url").toString();
    /**
     * 柠檬接口URI=>姓名、身份证、银行卡一致性验证【Minivision提供的接口】
     */
    public static final String NAMEIDCARDACCOUNTVERIFYV1_URI = "/nameIdCardAccountVerifyV1";
    /**
     * 学籍信息验证调用国政通接口的token
     */
    public static final String GUOZHENGTONG_SCHOOLINFO_TOKEN = CustomizedPropertyConfigurer.getContextProperty("guozhengtong.schoolinfo.token").toString();

    /**
     * k贷app 征信查询token
     */
    public static final String K_LOAN_CREDIT_QUERY_TOKEN=CustomizedPropertyConfigurer.getContextProperty("k.loan.credit.token").toString();

    /** 使用场景，催收消息空消费(一般是处理无用的MQ里堆积的消息)|(1:打开[空消费];0:关闭[正常消费]) */
    public static final String ROCKET_MQ_CONSUMER_PURE_OPEN = "1";
    public static final String ROCKET_MQ_CONSUMER_PURE_CLOSE = "0";

    /** ------------贷后接口相关常量部分----------------- */
    /**
     * 调用贷后系统标识
     */
    public static final String SYSTEMID = "PHKX";


    /**
     * 贷后IP白名单限制
     */
    public final String NOT_IN_IP_WHITE_LIST = "0001";

    /**
     * 贷后签名错误
     */
    public static final String SIGN_ERROR = "0002";

    /**
     * 贷后未查询出对应数据
     */
    public static final String NO_DATA = "0003";

    /**
     * 贷后查询出现未知错误
     */
    public static final String INVOKE_ERROR = "0004";

    /**
     * 贷后接口返回成功CODE
     */
    public static final String SUCCESS_CODE = "0000";

    /**
     * 贷后接口返回常量success
     */
    public static final String SUCCESS = "success";

    /**
     * 贷后接口返回常量code
     */
    public static final String CODE = "code";

    /**
     * 贷后接口返回DATAcode
     */
    public static final String DATA = "data";

    /**
     * 贷后接口返回MSGcode
     */
    public static final String MSG = "message";

    /** ------------贷后接口相关常量部分----------------- */

    /**
     * 银行卡限额的描述
     */

    public static final Map<String, String> cardMap = new HashMap<String, String>();
    static {
        cardMap.put("100_1", "单笔限额2万元,日限额2万元");
        cardMap.put("102_0", "单笔限额5000元,日无限额");
        cardMap.put("102_1", "单笔限额5000元,日无限额");
        cardMap.put("103_0", "单笔限额5000元,日限额5000元");
        cardMap.put("103_1", "单笔限额1万元,日限额5万元");
        cardMap.put("104_0", "单笔限额1万元,日限额1万元");
        cardMap.put("104_1", "单笔限额为信用额度,日限额为信用额度");
        cardMap.put("105_0", "单笔限额1万元,日限额2万");
        cardMap.put("105_1", "单笔限额1万元,日限额5万");
        cardMap.put("302_0", "单笔限额5万元,日限额20万元");
        cardMap.put("302_1", "单笔限额为信用额度,日限额为信用额度");
        cardMap.put("303_0", "单笔限额5万元,日限额5万元");
        cardMap.put("303_1", "单笔限额5万元,日限额5万元");
        cardMap.put("304_0", "单笔限额1万元,日限额1万元");
        cardMap.put("304_1", "单笔限额2万元,日限额2万元");
        cardMap.put("305_0", "单笔限额3万元,日限额3万元");
        cardMap.put("305_1", "单笔限额2万元,日限额2万元");
        cardMap.put("306_0", "单笔限额5万元,日限额5万元");
        cardMap.put("306_1", "单笔限额2万元,日限额为信用额度");
        cardMap.put("307_0", "单笔限额5万元,日限额5万元");
        cardMap.put("307_1", "单笔限额2万,日限额2万");
        cardMap.put("308_0", "单笔限额3万元,日限额3万元");
        cardMap.put("308_1", "单笔限额3万,日限额3万");
        cardMap.put("309_0", "单笔限额2万元,日限额2万元");
        cardMap.put("309_1", "单笔无限额,日无限额");
        cardMap.put("310_0", "单笔限额10万元,日限额10万元");
        cardMap.put("310_1", "单笔限额10万元,日限额10万元");
        cardMap.put("403_0", "单笔限额2万元,日限额2万元");
        cardMap.put("403_1", "单笔限额5万元,日限额5万元");
    }

    public static String getDepict(String key) {
        return cardMap.get(key);
    }

    /**
     * @Description (返回产品类型)
     * @param localLoanType
     * @return
     */
    public static String getProdTypeByLocalLoanType(String localLoanType) {
        String prodType = "";
        if (QhxgConstants.LOCAL_LOAN_TYPE_NORMAL.equals(localLoanType) || QhxgConstants.LOCAL_LOAN_TYPE_CASH_FZ.equals(localLoanType)) {
            prodType = QhxgConstants.PROD_TYPE_NORMAL;
        } else if (QhxgConstants.LOCAL_LOAN_SMALL.equals(localLoanType)) {
            prodType = QhxgConstants.PROD_TYPE_SMALL;
        } else if (QhxgConstants.LOCAL_LOAN_SMALL_EXPORT_A.equals(localLoanType)) {
            prodType = QhxgConstants.PROD_TYPE_SMALL_EXPORT_A;
        } else if (QhxgConstants.LOCAL_LOAN_RESERVATION_A.equals(localLoanType)) {
            prodType = QhxgConstants.PROD_TYPE_RESERVATION_A;
        } else if (QhxgConstants.LOCAL_LOAN_RESERVATION_B.equals(localLoanType)) {
            prodType = QhxgConstants.PROD_TYPE_RESERVATION_B;
        } else if (QhxgConstants.LOCAL_LOAN_TYPE_DXD.equals(localLoanType) || QhxgConstants.LOCAL_LOAN_TYPE_RONG360.equals(localLoanType)) {
            prodType = QhxgConstants.PROD_TYPE_DXD;
        } else if (QhxgConstants.LOCAL_LOAN_TYPE_MERLOAN.equals(localLoanType)) {
            prodType = QhxgConstants.PROD_TYPE_MERLOAN;
        } else if (QhxgConstants.LOCAL_LOAN_LOW_RATE.equals(localLoanType)
                || QhxgConstants.LOCAL_LOAN_TYPE_CASH_FZ_LOW_RATE.equals(localLoanType)) {
            prodType = QhxgConstants.PROD_TYPE_LOW_RATE;
        } else {
            prodType = QhxgConstants.PROD_TYPE_NORMAL;
        }
        return prodType;
    }

    public static String getSex(String certNo) {
        String sex = "先生[女士]";
        if (certNo != null && !certNo.equals("")) {
            switch (certNo.length()) {
                case 15:
                    if (certNo.toCharArray()[14] % 2 == 0) {
                        sex = "女士";
                    } else {
                        sex = "先生";
                    }
                    break;
                case 18:
                    if (certNo.toCharArray()[16] % 2 == 0) {
                        sex = "女士";
                    } else {
                        sex = "先生";
                    }
                    break;
                default:
                    break;
            }
            return sex;
        } else {
            return sex;
        }
    }

    /**
     * 家庭联系人
     */
    public static final String RELATION_TYPE_ONE = "1";
    /**
     * 其他联系人
     */
    public static final String RELATION_TYPE_TWO = "2";

    /**华夏银行开户mq  ESTABLISHACCOUNT_OPERATE_TYPE 开户，WITHDRAWCASH_OPERATE_TYPE 提现，OPERATE_STATUS   **/
    public static final int ESTABLISHACCOUNT_OPERATE_TYPE = 10;
    public static final int WITHDRAWCASH_OPERATE_TYPE = 20;
    public static final String OPERATE_STATUS = "200";
    /**华夏银行开户参数
     * NICKNAME_PREFIX nickname前缀
     * ORIGIN_CHANNEL 开户来源渠道
     * **/
    public static final String  NICKNAME_PREFIX= CustomizedPropertyConfigurer.getContextProperty("nickname.prefix").toString();
    public static final String  ORIGIN_CHANNEL = CustomizedPropertyConfigurer.getContextProperty("origin.channel").toString();

    public static final String TOKEN_NAME = "token::";
    public static final String H5_LOGIN = "h5";
    public static final String DEFAULT_LOGIN = "default";

    public static final String PDF_URL = "/data/build_home/backend_build/pdf/";
    public static final String FILE_URL = "/data/build_home/backend_build/pdf/";

    //public static final String PDF_URL = "E:\\pdf\\";
}
